import  sys
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from PyQt5.QtWebEngineWidgets import *
class MainWindow(QMainWindow):
    def __init__(self):
        super(QMainWindow,self).__init__()
        self.setWindowTitle("打开网页")
        self.setGeometry(6,36,1000,700)
        self.browser=QWebEngineView()
        url='C:/Users/song/PycharmProjects/Qtdemo/高级控件/index.html'
        self.browser.load(QUrl(url))
        self.setCentralWidget(self.browser)
if __name__ == '__main__':
    app=QApplication(sys.argv)
    win=MainWindow()
    win.show()
    sys.exit(app.exec_())
